<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">日志列表</div>
                </div>
                <!-- 工具栏 -->
                <div class="page_toolbar am-margin-bottom-xs am-cf">
                    <form id="form-search" class="toolbar-form" action="">
                        <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
                        <div class="am-u-sm-12 am-u-md-9" style="float: right;">
                            <div class="am fr">
                                <div class="am-form-group am-fl">
                                    <select name="type"
                                            data-am-selected="{btnSize: 'sm', placeholder: '方案类型(全部)'}">

                                        <option value="-1" <?= $request->get('type') == '-1' ? 'selected' : '' ?>>
                                            方案类型(全部)
                                        </option>
                                        <option value="3" <?= $request->get('type') === '3' ? 'selected' : '' ?>>
                                            方案一
                                        </option>
                                        <option value="4" <?= $request->get('type') == '4' ? 'selected' : '' ?>>
                                            方案二
                                        </option>
                                    </select>
                                </div>
                                <div class="am-form-group tpl-form-border-form am-fl">
                                    <input type="text" name="start_time"
                                           class="am-form-field"
                                           value="<?= $request->get('start_time') ?>" placeholder="修改起始日期"
                                           data-am-datepicker readonly>
                                </div>
                                <div class="am-form-group tpl-form-border-form am-fl">
                                    <input type="text" name="end_time"
                                           class="am-form-field"
                                           value="<?= $request->get('end_time') ?>" placeholder="修改截止日期"
                                           data-am-datepicker readonly>
                                </div>
                                <div class="am-form-group am-fl">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form">

                                        <div class="am-input-group-btn" style="width: auto;">
                                            <button class="am-btn am-btn-default am-icon-search"
                                                    type="submit"></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
                    <div class="order-list am-scrollable-horizontal am-u-sm-12 am-margin-top-xs">
                        <table width="100%" class="am-table am-table-centered
                        am-text-nowrap am-margin-bottom-xs">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>方案类型</th>
                                <th>是否使用</th>
                                <th width="45%" class="goods-list">修改内容</th>
                                <th>设备来源</th>
                                <th>修改时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $colspan = 8; ?>
                            <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                                <tr class="order-empty">
                                    <td colspan="<?= $colspan ?>"></td>
                                </tr>

                                <tr>

                                    <td class="am-text-middle">
                                        <p><?= $item['id'] ?></p>
                                    </td>
                                    <td class="am-text-middle">
                                        <?php if($item['type']==3):?>
                                            <span class="j-state am-badge x-cur-p
                                           am-badge-success">
                                                方案一
                                           </span>
                                        <?php elseif($item['type']==4):?>
                                            <span class="j-state am-badge x-cur-p
                                           am-badge-warning">
                                                方案二
                                           </span>
                                        <?php endif;?>
                                    </td>
                                    <td class="am-text-middle">
                                        <?php if($item['values']['dealerCase']!=0):?>
                                            <span class="j-state am-badge x-cur-p
                                           am-badge-success">
                                                是
                                           </span>
                                        <?php elseif($item['values']['dealerCase']==0):?>
                                            <span class="j-state am-badge x-cur-p
                                           am-badge-danger">
                                                否
                                           </span>
                                        <?php endif;?>
                                    </td>
                                    <?php if($item['type']==3):?>
                                        <td class="am-text-middle">
                                            <div class="goods-list">
                                                <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销条件(元)</span>：<?= $item['values']['distribution_con'] ?></p>
                                                <?php if($item['values']['distribution_type']==1):?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销类型</span>：单笔 </p>
                                                <?php else:?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销类型</span>：累加</p>
                                                <?php endif;?>
                                                <p><span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金(%)</span>：<?= $item['values']['consume_charge'] ?></p>
                                                <?php if($item['values']['product_status']==1):?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：开启 </p>
                                                <?php else:?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：关闭</p>
                                                <?php endif;?>
                                                <?php if($item['values']['card_status']==1):?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：开启 </p>
                                                <?php else:?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：关闭</p>
                                                <?php endif;?>
                                                <?php if($item['values']['hot_sale_status']==1):?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：开启 </p>
                                                <?php else:?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：关闭</p>
                                                <?php endif;?>
                                                <?php if($item['values']['status']==1):?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">配置状态</span>：开启 </p>
                                                <?php else:?>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">配置状态</span>：关闭</p>
                                                <?php endif;?>
                                            </div>
                                        </td>
                                    <?php elseif($item['type']==4):?>
                                        <td class="am-text-middle">
                                            <div class="goods-list">
                                                <div class="goods-image">
                                                        <span class="j-state am-badge x-cur-p
                                                       am-badge-free">
                                                            普通用户:
                                                       </span>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销比例(%)</span>：<?= $item['values']['common']['dealer_percent'] ?>;
                                                        <?php if($item['values']['common']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：开启
                                                        <?php elseif($item['values']['common']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['common']['product_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：开启
                                                        <?php elseif($item['values']['common']['product_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['common']['card_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：开启
                                                        <?php elseif($item['values']['common']['card_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['common']['gifts_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：开启
                                                        <?php elseif($item['values']['common']['gifts_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：关闭
                                                        <?php endif;?>
                                                    <p>
                                                        <span class="j-state am-badge x-cur-p
                                                       am-badge-free">
                                                            代言人:
                                                       </span>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销比例(%)</span>：<?= $item['values']['staff']['dealer_percent'] ?>;
                                                        <?php if($item['values']['staff']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：开启
                                                        <?php elseif($item['values']['staff']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['staff']['product_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：开启
                                                        <?php elseif($item['values']['staff']['product_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['staff']['card_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：开启
                                                        <?php elseif($item['values']['staff']['card_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['staff']['gifts_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：开启
                                                        <?php elseif($item['values']['staff']['gifts_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：关闭
                                                        <?php endif;?>
                                                    <p>
                                                        <span class="j-state am-badge x-cur-p
                                                       am-badge-free">
                                                            微股东:
                                                       </span>
                                                    <p><span class="j-state am-badge x-cur-p am-badge-secondary">分销比例(%)</span>：<?= $item['values']['wgd']['dealer_percent'] ?>;
                                                        <?php if($item['values']['wgd']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：开启
                                                        <?php elseif($item['values']['wgd']['face_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">消费赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['wgd']['product_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：开启
                                                        <?php elseif($item['values']['wgd']['product_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['wgd']['card_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：开启
                                                        <?php elseif($item['values']['wgd']['card_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['wgd']['gifts_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：开启
                                                        <?php elseif($item['values']['wgd']['gifts_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：关闭
                                                        <?php endif;?>
                                                    <p>
                                                        <span class="j-state am-badge x-cur-p
                                                       am-badge-free">
                                                            会员:
                                                       </span>
                                                    <p> 

                                                        <?php if($item['values']['vip']['product_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：开启
                                                        <?php elseif($item['values']['vip']['product_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">商品赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['vip']['card_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：开启
                                                        <?php elseif($item['values']['vip']['card_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">储值卡赏金状态</span>：关闭
                                                        <?php endif;?>
                                                        <?php if($item['values']['vip']['gifts_status']==1):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：开启
                                                        <?php elseif($item['values']['vip']['gifts_status']==2):?>
                                                            <span class="j-state am-badge x-cur-p am-badge-secondary">爆品礼赏金状态</span>：关闭
                                                        <?php endif;?>
                                                    <p>


                                                </div>

                                            </div>
                                        </td>
                                    <?php endif;?>

                                    <td class="am-text-middle">
                                        <?= $item['deviceType']?:"未知" ?>
                                    </td>

                                    <td class="am-text-middle">
                                        <?= $item['create_time'] ?>

                                    </td>

                                </tr>

                            <?php endforeach; else: ?>
                                <tr>
                                    <td colspan="<?= $colspan ?>" class="am-text-center">暂无记录</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr"><?= $list->render() ?> </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：<?= $list->total() ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



